package cn.lg.soar.boot.fc.entity;

import cn.lg.soar.core.annotations.constraints.group.*;
import cn.lg.soar.database.query.annotations.*;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.*;
import io.swagger.annotations.*;
import lombok.Data;
import java.io.Serializable;
import java.time.*;
import javax.validation.constraints.*;

import cn.lg.soar.database.base.entity.BaseEntity;

/**
 * 收费信息表
 * @author ZhuanZ（无密码）
 * @since 2025-02-10
 * 开源项目：https://gitee.com/lgx1992/lg-soar 求star！请给我star！请帮我点个star！
 */
@Data
@ApiModel(value = "Cost", description = "收费信息表")
@TableName("fc_cost")
public class Cost extends BaseEntity {

    /** 收费金额 */
    @NotBlank(message = "收费金额不能为空", groups = { Create.class, Update.class })
    @ExcelProperty(value = "收费金额")
    @ApiModelProperty(value = "收费金额")
    private String amount;

    /** 附件 */
    @ExcelProperty(value = "附件")
    @ApiModelProperty(value = "附件")
    private String attachment;

    /** 收费名称 */
    @NotBlank(message = "收费名称不能为空", groups = { Create.class, Update.class })
    @ExcelProperty(value = "收费名称")
    @ApiModelProperty(value = "收费名称")
    private String costName;

    /** 收费类型(0-物业费 1-水费 2-电费 3-取暖费 4-其他) */
    @NotNull(message = "收费类型(0-物业费 1-水费 2-电费 3-取暖费 4-其他)不能为空", groups = { Create.class, Update.class })
    @ExcelProperty(value = "收费类型(0-物业费 1-水费 2-电费 3-取暖费 4-其他)")
    @ApiModelProperty(value = "收费类型(0-物业费 1-水费 2-电费 3-取暖费 4-其他)")
    private Integer costType;

    /** 收费周期(0-月付 1-季付 2-半年付 3-年付) */
    @NotNull(message = "收费周期(0-月付 1-季付 2-半年付 3-年付)不能为空", groups = { Create.class, Update.class })
    @ExcelProperty(value = "收费周期(0-月付 1-季付 2-半年付 3-年付)")
    @ApiModelProperty(value = "收费周期(0-月付 1-季付 2-半年付 3-年付)")
    private Integer cycle;

    /** 扩展字段1 */
    @ExcelProperty(value = "扩展字段1")
    @ApiModelProperty(value = "扩展字段1")
    private String extend1;

    /** 扩展字段2 */
    @ExcelProperty(value = "扩展字段2")
    @ApiModelProperty(value = "扩展字段2")
    private String extend2;

    /** 扩展字段3 */
    @ExcelProperty(value = "扩展字段3")
    @ApiModelProperty(value = "扩展字段3")
    private String extend3;

    /** 收费ID */
    @NotNull(message = "主键不能为空", groups = { Update.class })
    @ExcelIgnore
    @ApiModelProperty(value = "主键")
    @TableId(type = IdType.AUTO)
    private Long id;

    /** 滞纳金 */
    @NotBlank(message = "滞纳金不能为空", groups = { Create.class, Update.class })
    @ExcelProperty(value = "滞纳金")
    @ApiModelProperty(value = "滞纳金")
    private String lateFee;

    /** 排序 */
    @NotNull(message = "排序不能为空", groups = { Create.class, Update.class })
    @ExcelProperty(value = "排序")
    @ApiModelProperty(value = "排序")
    private Integer orders;

    /** 乐观锁 */
//    @NotNull(message = "乐观锁不能为空", groups = { Create.class, Update.class })
    @ExcelProperty(value = "乐观锁")
    @ApiModelProperty(value = "乐观锁")
    private Integer version;

    @JsonIgnore
    @Override
    public Long primaryKey() {
        return this.id;
    }

}
